package org.eiahe.hr.attendance.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.attendance.domain.AnnualLeaveRule;

/**
 * 年假规则业务对象
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = AnnualLeaveRule.class, reverseConvertGenerate = false)
public class AnnualLeaveRuleBo extends BaseEntity {

    /**
     * 规则ID
     */
    @NotNull(message = "规则ID不能为空", groups = { EditGroup.class })
    private Long ruleId;

    /**
     * 规则名称
     */
    @NotBlank(message = "规则名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String ruleName;

    /**
     * 最小工龄(年)
     */
    @NotNull(message = "最小工龄不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer minWorkYears;

    /**
     * 最大工龄(年,空表示不限)
     */
    private Integer maxWorkYears;

    /**
     * 年假天数
     */
    @NotNull(message = "年假天数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer leaveDays;

    /**
     * 是否生效(0否 1是,仅1条可生效)
     */
    private String isActive;

    /**
     * 状态(0正常 1停用)
     */
    private String status;

    /**
     * 备注
     */
    private String remark;
}
